package com.zqx.factory_method.client;

import com.zqx.factory_method.factory.FileLoggerFactory;
import com.zqx.factory_method.factory.LoggerFactory;
import com.zqx.factory_method.product.Logger;
import com.zqx.factory_method.utils.XMLUtil;

/**
 * description: 客户端
 * @author zqx
 * @date 2018/09/02
 */
public class Client {

    public static void main(String[] args) {
        /*LoggerFactory factory = new FileLoggerFactory();
        Logger logger = factory.createLogger();
        logger.writeLog();*/
        LoggerFactory factory = (LoggerFactory)XMLUtil.getBean();
        Logger logger = factory.createLogger();
        logger.writeLog();
    }
}
